ApplicationContext
配置,在TestContext框架中整合测试。the section called “Context configuration with Groovy scripts”TestTransaction
接口,使用编程化来开始结束测试管理事务。the section called “Programmatic transaction management”Sql
和SqlConfig
注解申明在每一个类和方法中。the section called “Executing SQL scripts”@TestPropertySource
注解来自动覆盖系统和应用的属性值。the section called “Context configuration with test property sources”。TestExecutionListeners
现在可以自动被发现。the section called “Automatic discovery of default TestExecutionListeners” 。TestExecutionListeners
现在可以通过默认的监听器自动合并。the section called “Merging TestExecutionListeners”。 MockServletContext
、MockHttpServletRequest
和其他servlet接口mocks等诸多改善。AssertThrows
重构后,Throwable
代替Exception
。MockMvcBuilder
现在可以在MockMvcConfigurer
的帮助下创建。MockMvcConfigurer
的加入使得Spring Security的设置更加简单,同时使用于任何第三方的普通封装设置或则仅仅在本项目中。MockRestServiceServer
现在支持AsyncRestTemplate
作为客户端测试。SessionSubscribeEvent
和
SessionUnsubscribeEvent
,用于STOMP客户端的订阅和取消订阅.